package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.TeacherDaily;
import com.ruoyi.system.mapper.TeacherDailyMapper;
import com.ruoyi.system.service.ITeacherDailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 教师日报表Service业务层处理
 * 
 * @author bearzz
 * @date 2024-01-22
 */
@Service
public class TeacherDailyServiceImpl implements ITeacherDailyService
{
    @Autowired
    private TeacherDailyMapper teacherDailyMapper;

    /**
     * 查询教师日报表
     * 
     * @param id 教师日报表主键
     * @return 教师日报表
     */
    @Override
    public TeacherDaily selectTeacherDailyById(Long id)
    {
        return teacherDailyMapper.selectTeacherDailyById(id);
    }

    /**
     * 查询教师日报表列表
     * 
     * @param teacherDaily 教师日报表
     * @return 教师日报表
     */
    @Override
    public List<TeacherDaily> selectTeacherDailyList(TeacherDaily teacherDaily)
    {
        return teacherDailyMapper.selectTeacherDailyList(teacherDaily);
    }

    /**
     * 新增教师日报表
     * 
     * @param teacherDaily 教师日报表
     * @return 结果
     */
    @Override
    public int insertTeacherDaily(TeacherDaily teacherDaily)
    {
        teacherDaily.setCreateTime(DateUtils.getNowDate());
        return teacherDailyMapper.insertTeacherDaily(teacherDaily);
    }

    /**
     * 修改教师日报表
     * 
     * @param teacherDaily 教师日报表
     * @return 结果
     */
    @Override
    public int updateTeacherDaily(TeacherDaily teacherDaily)
    {
        return teacherDailyMapper.updateTeacherDaily(teacherDaily);
    }

    /**
     * 批量删除教师日报表
     * 
     * @param ids 需要删除的教师日报表主键
     * @return 结果
     */
    @Override
    public int deleteTeacherDailyByIds(Long[] ids)
    {
        return teacherDailyMapper.deleteTeacherDailyByIds(ids);
    }

    /**
     * 删除教师日报表信息
     * 
     * @param id 教师日报表主键
     * @return 结果
     */
    @Override
    public int deleteTeacherDailyById(Long id)
    {
        return teacherDailyMapper.deleteTeacherDailyById(id);
    }
}
